package one.stand.service.impl.checkparam;

import one.stand.request.CompanyRequest;
import org.springframework.util.StringUtils;

/**
 * 企业参数验证集合
 * @author Administrator
 */
public class CommpanyServiceCheckParam {

    /**
     * 修改企业
     *
     * @param request
     * @return
     */
    public static boolean upd(CompanyRequest request) {
        if (add(request)) {
            return true;
        }
        return false;
    }

    /**
     * 创建企业
     *
     * @param request
     * @return
     */
    public static boolean add(CompanyRequest request) {
        if (StringUtils.isEmpty(request.getCompanyLogo()) || StringUtils.isEmpty(request.getCompanyName()) || request.getIndustryId() == null) {
            return true;
        }
        return false;
    }
}
